package com.fanfanwang.ffw.app.bean;

import android.content.Context;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.Button;

import com.fanfanwang.ffw.app.R;

public class MyCount extends CountDownTimer {

	private Button re_bt_getcode;
	private Context context;
	public MyCount(long millisInFuture, long countDownInterval,Button re_bt_getcode,Context context) {
		super(millisInFuture, countDownInterval);
		this.re_bt_getcode=re_bt_getcode;
	}

	@Override
	public void onFinish() {
		re_bt_getcode.setText(context.getResources().getString(R.string.register_reget));
		re_bt_getcode.setClickable(true);
	}

	@Override
	public void onTick(long millisUntilFinished) {
		re_bt_getcode.setText("(" + millisUntilFinished / 1000 + ")");
		re_bt_getcode.setClickable(false);
	}

}